<table width="100%" cellspacing="0" cellpadding="8" class="newsfeed" id="myTable" border="0"  valign="top">
<thead>
	<tr>
        <th></th>
        <th colspan="5">Remaining vacation days</th>
	</tr>
    <tr>
        <th>Name</th>
<?php foreach($this->allReportYear as $year) {?>        
        <th><?php echo $year; ?></th>
<?php }?>        
    </tr>
</thead>    
<tbody>

    <?php
    foreach ($this->allTimeoff as $name => $oItem)
    {
//    	print_r($oItem);die;
    	
    	echo '<tr><th>' . $name . '</th>';
    	foreach($this->allReportYear as $year) 
    	{      
    		$need = '';
    		if (isset($oItem[$year]))
    		  $need = $oItem[$year];
            echo '<td>' . (24 - ($need /8)) .'</td>';
        } 
    	
//    	foreach ($oItem as $date => $hour)
//    	{
//    		echo '<td>' . $date . '</td><td>' . (24 - ($hour /8)) . '</td>'; 
//    	}
		echo '</tr>';
    }
    ?>
    
</tbody>    
</table>

